package com.bj.dljd.convent;


import com.bj.dljd.domain.UserInfo;
import com.bj.dljd.domain.UserPayConfig;
import com.bj.dljd.domain.UserPayInfo;
import com.bj.dljd.models.vo.UserPayInfoVo;
import com.bj.dljd.models.vo.UserPayVo;
import com.bj.dljd.models.vo.UserQueryVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.util.List;

@Mapper(componentModel = "spring",uses = CommonFun.class)
public interface UserPayConfigConvent  {

    List<UserPayVo> convertListUserPayConfigVo(List<UserPayConfig> payConfigList);
    List<UserPayInfoVo> convertListUserPayVo(List<UserPayInfo> payConfigList);


    @Mappings({
            @Mapping(source = "status", target = "status",qualifiedByName = "convertStatus"),
            @Mapping(source = "editTime", target = "editTime", dateFormat = "yyyy-MM-dd HH:mm:ss"),
            @Mapping(source = "payProductCode", target = "productCode"),
            @Mapping(source = "payProductName", target = "productName"),
            @Mapping(source = "autoSett", target = "autoSett",qualifiedByName = "transAutoSetting"),
    })
    UserPayVo mapUsePayConfigVo(UserPayConfig payConfig);



    UserQueryVo mapUserQueryVo(UserInfo userInfo);
}